package com.lanou.pianke.piecetag.web.controller;

import com.lanou.pianke.piecetag.web.entity.PieceTag;
import com.lanou.pianke.piecetag.web.piecetagService.PiecetagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class PiecetagController {

    @Autowired
    private PiecetagService piecetagService;

    @GetMapping("/piece/tag")
    public String goAndListTag(Map map){
        List<PieceTag> list = piecetagService.listPiecetag();
        map.put("pieceTag",list);
        return "/piece/tag";
    }

}
